/**
 * Divider 组件的主题配置
 * 
 * 基于企业级设计规范 (Divider.json) 的完整配置
 * 分割线组件样式定义
 */

import type { ComponentToken } from 'antd/es/divider/style';

// ========== 设计 Token 常量 ==========

/**
 * 间距相关 Token
 */
const SPACING_TOKENS = {
  textPaddingInline: '1em',
  verticalMarginInline: 8,
} as const;

/**
 * 布局相关 Token
 */
const LAYOUT_TOKENS = {
  orientationMargin: 0.05,
} as const;

/**
 * Divider 完整主题配置
 */
export const dividerThemeConfig: Partial<ComponentToken> = {
  // ========== 间距配置 ==========
  textPaddingInline: SPACING_TOKENS.textPaddingInline as any,
  verticalMarginInline: SPACING_TOKENS.verticalMarginInline,

  // ========== 布局配置 ==========
  orientationMargin: LAYOUT_TOKENS.orientationMargin,
};

export const getDividerTheme = (
  customConfig?: Partial<ComponentToken>
): Partial<ComponentToken> => {
  return {
    ...dividerThemeConfig,
    ...customConfig,
  };
};

export type { ComponentToken as DividerComponentToken } from 'antd/es/divider/style';

